When a loudspeaker is in use, if a sound production fault occurs in the loudspeaker, for example, when an internal device ages or is damaged, or the environment is too humid or the temperature is too high, or the surface is covered, the loudspeaker cannot produce sound normally, and a sound effect of the loudspeaker is affected, which brings about a bad experience to users. Generally speaking, only when finding that the sound effect of the loudspeaker has a problem do the users check the loudspeaker, so as to troubleshoot the problem or replace the loudspeaker.